<script setup>

//存储vue页面逻辑js代码
    import {ref} from 'vue'
    let number=ref(1)

    function numberref(){

      number.value++
    }
    
    function numberdesc(){

      number.value--
}

    // function alaryNumber(){

    //   alert(number.value)
    // }

    let alaryNumber=()=>{

      alert(number.value)
    }

    

      number,
      numberref,
      numberdesc,
      alaryNumber
</script>

<template>

  <div>
    <button @click="numberref()">+</button>
    <span v-text="number"></span>
    <button @click="numberdesc">-</button>
    <button @click="alaryNumber()">显示number</button>

  </div>

</template>

<style scoped>

</style>
